from openpyxl import Workbook
with open("班级名单.txt", "r", encoding="utf-8") as file:
    names = file.read()
    print(names)

workbook = openpyxl.workbook()

